package com.songlanyun.modules.goods.dao;

import com.songlanyun.modules.goods.entity.GoodsAuthShop;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商家所发商品的与店铺的授权关系表，平台店铺发的商品如A,平台会有一条店铺与商品的关系，商家店铺SS也要代销平台商品，则需要建立一条商品A也商品店铺SS的关系，店铺SS可以随时上下架这个平台商品
 * 
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-05 10:01:59
 */
@Mapper
public interface GoodsAuthShopDao extends BaseMapper<GoodsAuthShop> {

    /**
     * 查询商品某个店铺的经营权限
     * @param shopId
     * @param goodsId
     * @return
     */
    GoodsAuthShop getAuthorizeInfo(@Param("authorize_shop_id") Long shopId, @Param("goods_id")Long goodsId);

    /**
     * 查询某个商品店直营权限
     * @param goodsId
     * @return
     */
    GoodsAuthShop getDirectSaleAuthorizeInfo(@Param("goods_id")Long goodsId);
}
